﻿<!DOCTYPE html>
<html lang="en">
<head>
    <title>חיפוש קורס</title>
    <link href="../../Content/Site.css" rel="stylesheet" />
    <script src="../../Scripts/jquery-1.7.1.min.js" 
        type="text/javascript"></script>

        <script type="text/javascript">
            function find() {
                var id = $('#courseId').val();
                $.getJSON("api/Courses/" + id,
                    function (data) {
                        var str = data.CourseName;
                        $('#course').text(str);
                    })
                .fail(
                    function (jqXHR, textStatus, err) {
                        $('#course').text('Error: ' + err);
                    });
            }
        </script>

</head>
<body id="body" dir="rtl">
    <div class="main-content">
        <div>
            <h1>חיפוש קורס</h1>
        
        </div>
        <div>
            <label for="id">מספר קורס:</label>
            <input type="text" id="courseId" size="5"/>
            <input type="button" value="Search" onclick="find();" />
            <p id="course" />
        </div>
    </div>
      

</body>
</html>